The first step in finding the concentrations is to assign a variable x to the amount of the acid that has ionized. Then equation (2) becomes
Equation (3) yields a quadratic equation of the form
Using the quadratic equation, equation (4) can be solved for x :
Since the negative root would imply that the original concentration of the nitrous acid has increased (impossible because nitrous ions cannot simply appear), the negative root can be eliminated. The value for x gives the concentration of the hydronium ions and thus the pH value of the solution: